<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ include file="../base.jsp"%>
<%@ page contentType="text/html;charset=UTF-8" pageEncoding="utf-8" language="java" %>
<aside class="main-sidebar">
    <!-- sidebar: style can be found in sidebar.less -->
    <section class="sidebar">
        <!-- Sidebar user panel -->
        <div class="user-panel">
            <div class="pull-left image">
                <img src="${ctx}/img/user2-160x160.jpg" class="img-circle" alt="User Image">
            </div>
            <div class="pull-left info">
                <p>
                    <c:if test="${sessionScope.loginUser.username==null}">
                        <a href="${ctx}/login.do">您未登录</a>
                    </c:if>
                    ${sessionScope.loginUser.username}
                </p>
                <a href="#">${sessionScope.loginUser.username}</a>
            </div>
        </div>

        <!-- sidebar menu: : style can be found in sidebar.less -->
        <ul class="sidebar-menu">
            <li class="header">菜单</li>



            <li class="treeview">
                <a href="#">
                    <i class="fa fa-cube"></i> <span>案例调试</span>
                    <span class="pull-right-container">
                        <i class="fa fa-angle-left pull-right"></i>
                    </span>
                </a>
                <ul class="treeview-menu">
                    <%--遍历测试案例(重点)--%>
                    <li id="company-manager">
                        <a href="${ctx}/httpClient.do" onclick="setSidebarActive(this)" target="iframe">
                            <i class="fa fa-circle-o"></i>+测试新案例
                        </a>
                    </li>
                    <c:forEach items="${sessionScope.modules}" var="item">
                        <li id="${item.id}">
                            <a href="${ctx}/gotoTry.do?id=${item.id}" onclick="setSidebarActive(this)" target="iframe">
                                <i class="fa fa-circle-o"></i>${item.requestName}
                            </a>
                        </li>
                    </c:forEach>
                </ul>
            </li>
            <li class="treeview">
                <a href="#">
                    <i class="fa fa-cube"></i> <span>案例测试</span>
                    <span class="pull-right-container">
                        <i class="fa fa-angle-left pull-right"></i>
                    </span>
                </a>
                <ul class="treeview-menu">
                    <%--遍历测试案例(重点)--%>
                    <c:if test="${sessionScope.loginUser!=null}">
                    <c:forEach items="${sessionScope.modules}" var="item">
                        <li id="${item.id}">
                            <a href="${ctx}/gotoTest.do?id=${item.id}" onclick="setSidebarActive(this)" target="iframe">
                                <i class="fa fa-circle-o"></i>${item.requestName}
                            </a>
                        </li>
                    </c:forEach>
                    </c:if>
                </ul>
            </li>

            <li class="treeview">
                <a href="${ctx}/home.do" onclick="setSidebarActive(this)" target="iframe">
                    <i class="fa fa-cube"></i> <span>项目介绍</span>
                </a>
            </li>
        </ul>

    </section>
               <!-- /.sidebar -->
</aside>
